home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr11 / pdox693.zip / TI852.ASC < prev    next >
Text File  |  1993-02-23  |  17KB  |  529 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  Paradox                                NUMBER  :  852
  9.   VERSION  :  All
  10.        OS  :  DOS
  11.      DATE  :  February 23, 1993                        PAGE  :  1/8
  12.  
  13.     TITLE  :  Styling Paradox Reports and Mailing Labels
  14.  
  15.  
  16.  
  17.  
  18.   The styling of printed text is usually controlled through the use
  19.   of setup strings.  In many software programs this styling is
  20.   handled by a printer driver which translates your software
  21.   requests for bolding, underlining or a special font, into setup
  22.   strings that the selected printer can understand.
  23.  
  24.   For instance, your word processor may allow you to highlight a
  25.   region of text and assign a styling attribute to that region
  26.   through a menu command.  This menu command then places special
  27.   hidden characters (referred to as control characters) around the
  28.   text.  These special characters are then translated into setup
  29.   strings by the printer driver at the time of printing.
  30.  
  31.   Paradox is different from these types of programs.  Rather than
  32.   using menu-driven styling commands and hidden control characters
  33.   Paradox allows you to enter the setup string directly into a
  34.   report specification.  There are no printer drivers and therefore
  35.   no translation is performed at the time of printing.  This
  36.   approach may seem intimidating at first, because you must obtain
  37.   the necessary setup strings from the printer documentation and
  38.   know how to enter these strings correctly.  Once the process is
  39.   mastered, however, you will gain access to most of the styling
  40.   capabilities that your printer has to offer.  Describing this
  41.   process, is the purpose of this Technical Information Sheet.
  42.  
  43.   The following section is a step-by-step explanation of the
  44.   process of placing setup strings into calculated fields in order
  45.   to style reports.
  46.  
  47.      1.  You may initially choose a global setup string for the
  48.          report through the report menu choices Settings | Setups.
  49.          At this time you may choose Custom and enter your own
  50.          custom string or choose Predefined and choose from a list
  51.          of predefined setup strings.  If you wish to view the
  52.          current global setup string, choose Custom at this
  53.          juncture.  Press <Enter> to accept the current printer
  54.          port, and you will see the current global setup string.
  55.          You may modify the setup string at this time.
  56.  
  57.      2.  Prior to performing any styling it is preferable to do all
  58.          other regular report customization.  It is far easier to
  59.          place the styling setup strings last than to adjust them
  60.          as you design the report specification.
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.   PRODUCT  :  Paradox                                NUMBER  :  852
  75.   VERSION  :  All
  76.        OS  :  DOS
  77.      DATE  :  February 23, 1993                        PAGE  :  2/8
  78.  
  79.     TITLE  :  Styling Paradox Reports and Mailing Labels
  80.  
  81.  
  82.  
  83.  
  84.      3.  Determine the appropriate setup string to perform the
  85.          formatting task and count the number of characters
  86.          contained in the string.  All ASCII characters with
  87.          decimal value of 31 or lower must be represented in three
  88.          digit decimal number preceded with a backslash (see
  89.          Appendix C of the PAL User's Guide for a complete list of
  90.          the ASCII Character Set and their corresponding decimal
  91.          codes).  For instance, the Escape character which has
  92.          ASCII decimal value of 27 would be represented as: \027.
  93.          This set of four characters counts as a single character
  94.          because Paradox will convert it into its single character
  95.          form when sending it to the printer.  A typical setup
  96.          string which bolds text on an HP Laserjet II is
  97.          represented as: \027(s3B.  This string has a character
  98.          count of 5.
  99.  
  100.      4.  Calculate the total number of setup string characters that
  101.          will be placed on each line of the Report Specification.
  102.          Make note of the highest number of setup string characters
  103.          on any one line.  We will refer to this number as the
  104.          Margin Offset.  Make sure you take into account all setup
  105.          strings on the line.  If you turn bolding on and off on
  106.          the same line using the string noted above (and its
  107.          complement which reverses the attribute), the Margin
  108.          offset would be 10.
  109.  
  110.      5.  Increase the Page Width of the report specification to
  111.          accommodate the space required for the Margin Offset.  For
  112.          instance, turning bolding on and off on the same line on a
  113.          Laserjet requires that the standard 80 character
  114.          portrait-mode Page Width be increased to 90.  You can
  115.          change the Page Width from the menu with the commands:
  116.          Setting | Pagelayout | Width.  This is a safety precaution
  117.          to keep the text of the report from being pushed into the
  118.          next page width.  If your report is less than 80
  119.          characters wide, it is not necessary to perform this step.
  120.  
  121.      6.  Reports that have multiple page widths must be handled
  122.          very carefully.  When you increase the Page Width from 80
  123.          to 90 in order to accommodate 10 characters of setup
  124.          string you may also be enveloping fields and text in the
  125.          first page width that actually belong to the next page
  126.          width.  Since the printer can only print 80 characters on
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.   PRODUCT  :  Paradox                                NUMBER  :  852
  141.   VERSION  :  All
  142.        OS  :  DOS
  143.      DATE  :  February 23, 1993                        PAGE  :  3/8
  144.  
  145.     TITLE  :  Styling Paradox Reports and Mailing Labels
  146.  
  147.  
  148.  
  149.  
  150.          a page, some text may "fall between the cracks" between
  151.          the first and second page widths.  To prevent this, you
  152.          must move the text that was originally included in the
  153.          second page width over to the right so that it once again
  154.          begins just to the right of the vertical bar that defines
  155.          the right margin.  If there are more than two page widths
  156.          in the report it may be necessary to adjust each and every
  157.          page width appropriately.  The concept here is that if the
  158.          original right margin was 80 then each page width as
  159.          defined by the new margin setting can still only print the
  160.          first 80 characters of each page width.  See Example 2
  161.          below for more details.
  162.  
  163.      7.  Be sure that you are currently running in Insert mode by
  164.          checking for the letters "ins" in the upper right corner
  165.          of the Report Design screen.  If it is not on, turn it on
  166.          by pressing the Insert key.
  167.  
  168.      8.  Move the cursor to the position on the Report
  169.          Specification where you want to begin a styling attribute.
  170.  
  171.      9.  From the Report menu select Field | Place | Calculated.
  172.          You will be prompted for an expression.  Type in the setup
  173.          string enclosed in double quotes.  For instance:
  174.          "\027(s3B".  Press <Enter> twice to accept the string and
  175.          place the field at the cursor location.  You will be
  176.          prompted to format the display width of the calculated
  177.          field.  Adjust the width to match the exact number of
  178.          characters in the setup string.  Bolding would look like
  179.          this: AAAAAA.
  180.  
  181.   General Notes:
  182.  
  183.   The setup strings will take up space in the Report Specification
  184.   and displace text or fields on the lines which they are placed.
  185.   This displacement will not actually occur when the report is
  186.   printed.  The spaces occupied by the setup strings will be "eaten
  187.   up" by the printer which interprets them as printing commands,
  188.   not literal characters to be printed.  If all the above
  189.   instructions are followed, all text and fields in the report
  190.   specification should print in the same location as they appeared
  191.   before styling was added.
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.   PRODUCT  :  Paradox                                NUMBER  :  852
  207.   VERSION  :  All
  208.        OS  :  DOS
  209.      DATE  :  February 23, 1993                        PAGE  :  4/8
  210.  
  211.     TITLE  :  Styling Paradox Reports and Mailing Labels
  212.  
  213.  
  214.  
  215.  
  216.   Paradox has no support for proportionally spaced fonts.
  217.   Activating these fonts may cause alignment problems, especially
  218.   if used in the table band in tabular reports.  Use these fonts
  219.   only in areas where strict columner alignment is not required (as
  220.   in a title in the report or page header).
  221.  
  222.   Notes on Mailing Labels:
  223.  
  224.   Mailing labels are different from the typical report in that data
  225.   in the first page width is used as a template for all other page
  226.   widths in the report spec.  Because the first page width can
  227.   effect the alignment of the subsequent page widths the Margin
  228.   Offset must be precise and the number of setup string characters
  229.   must be exactly the same on every line in the form band.  This
  230.   insures that a fixed number of spaces will be "eaten up" on every
  231.   line and thus the page widths beyond the first will not have a
  232.   staggered left margin.
  233.  
  234.   If you wish to style some lines of the label but not others, you
  235.   must place dummy setup strings on the lines that are not styled.
  236.   You can create a dummy setup string by turning off an attribute
  237.   immediately after turning it on.
  238.  
  239.   Examples:
  240.  
  241.   Example 1:
  242.  
  243.   The following example is based on a mailing label report.  It
  244.   will cover styling issues relevant to both normal reports and
  245.   reports in labels mode.  The setup strings in this example are
  246.   appropriate for an HP Laserjet II.
  247.  
  248.   For the purpose of clarity, we will use a letter key to identify
  249.   each field in the report specification.  Your report
  250.   specification would not actually appear this way.  This is the
  251.   key:
  252.  
  253.   A's = First Name
  254.   B's = Last Name
  255.   C's = Street Address
  256.   D's = City
  257.   E's = State
  258.   F's = Zip Code
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.   PRODUCT  :  Paradox                                NUMBER  :  852
  273.   VERSION  :  All
  274.        OS  :  DOS
  275.      DATE  :  February 23, 1993                        PAGE  :  5/8
  276.  
  277.     TITLE  :  Styling Paradox Reports and Mailing Labels
  278.  
  279.  
  280.  
  281.  
  282.   X's = a calculated field for bold type: "\027(s3B"
  283.   Y's = a calculated field for normal type: "\027(s0B"
  284.  
  285.  
  286.   Example 1a:
  287.  
  288.   This is the mailing label report before styling:
  289.  
  290.   ....+...10....+...20....+...3*....+...10....+...20....+...3*....
  291.   page─────────────────────────┼─────────────────────────────┼─────
  292.   form─────────────────────────┼─────────────────────────────┼─────
  293.   AAAAAAAAAA BBBBBBBBBB        │                             │
  294.   CCCCCCCCCCCCCCCCCCCC         │                             │
  295.   DDDDDDDDDD, EE FFFFF         │                             │
  296.   form─────────────────────────┼─────────────────────────────┼─────
  297.   page─────────────────────────┼─────────────────────────────┼─────
  298.   ═════════════════════════════╧═════════════════════════════╧═════
  299.  
  300.  
  301.   Example 1b:
  302.  
  303.   This is the report after styling only the first line (note that
  304.   the right margin has been increased to 40 in order to accommodate
  305.   the Margin Offset.)
  306.  
  307.   ....+...10....+...20....+...30....+...4*....+...10....+...20...
  308.   page───────────────────────────────────┼───────────────────────
  309.   form───────────────────────────────────┼───────────────────────
  310.   XXXXXAAAAAAAAAA BBBBBBBBBBYYYYY        │
  311.   CCCCCCCCCCCCCCCCCCCC                   │
  312.   DDDDDDDDDD, EE FFFFF                   │
  313.   form───────────────────────────────────┼───────────────────────
  314.   page───────────────────────────────────┼───────────────────────
  315.   ═══════════════════════════════════════╧═══════════════════════
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.   PRODUCT  :  Paradox                                NUMBER  :  852
  339.   VERSION  :  All
  340.        OS  :  DOS
  341.      DATE  :  February 23, 1993                        PAGE  :  6/8
  342.  
  343.     TITLE  :  Styling Paradox Reports and Mailing Labels
  344.  
  345.  
  346.  
  347.  
  348.   Note that the first line has 12 characters that will be absorbed
  349.   by the printer as print commands.  This will cause the right
  350.   margin to return to 30 so that the next page width will print in
  351.   the correct location.  The subsequent lines will have 12 extra
  352.   trailing spaces and will leave the margin at 40.  This would be
  353.   fine if this were a standard report, but in labels mode it will
  354.   cause alignment problems.  The labels would look like this on the
  355.   printed page:
  356.  
  357.   John Jones                                Ed Smith
  358.   10 Jones Street                                      10 Smith St.
  359.   Jonestown, NJ 06060                                  Smithtown,..
  360.  
  361.  
  362.   Example 1c:
  363.  
  364.   The example below displays a method which corrects this effect.
  365.   Each line beyond the first is padded with a set of dummy setup
  366.   strings.  These strings will have no styling effect and will be
  367.   "eaten up" by the printer.  This will pull the right margin back
  368.   to its correct position.  Keep in mind that labels reports are
  369.   special in that they must contain exactly the same number of
  370.   setup string characters on every line of the report.  This
  371.   padding technique is only necessary for mailing labels.
  372.  
  373.  
  374.   ....+...10....+...20....+...30....+...4*....+...10....+...20...
  375.   page───────────────────────────────────┼───────────────────────
  376.   form───────────────────────────────────┼───────────────────────
  377.   XXXXXAAAAAAAAAA BBBBBBBBBBYYYYY        │
  378.   XXXXXYYYYYCCCCCCCCCCCCCCCCCCCC         │
  379.   XXXXXYYYYYDDDDDDDDDD, EE FFFFF         │
  380.   form───────────────────────────────────┼───────────────────────
  381.   page───────────────────────────────────┼───────────────────────
  382.   ═══════════════════════════════════════╧═══════════════════════
  383.  
  384.   Example 2:
  385.  
  386.   This example demonstrates proper text and field adjustment when
  387.   using setup strings for styling in a multiple page width report.
  388.   Different letters are once again used to differentiate between
  389.   different fields.
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.   PRODUCT  :  Paradox                                NUMBER  :  852
  405.   VERSION  :  All
  406.        OS  :  DOS
  407.      DATE  :  February 23, 1993                        PAGE  :  7/8
  408.  
  409.     TITLE  :  Styling Paradox Reports and Mailing Labels
  410.  
  411.  
  412.  
  413.  
  414.   Example 2a:
  415.  
  416.   This is a simple multiple page free form report before
  417.   modification.
  418.  
  419.   ....+...10....+...20....+...3*....+...10....+...20....+...3*....
  420.    Report Header Info          │ Report Header Info
  421.   page─────────────────────────┼─────────────────────────────┼─────
  422.   form─────────────────────────┼─────────────────────────────┼─────
  423.   AAAAAAAAAA BBBBBBBBBB        │CCCCCCCC DDDDDDDDDDDDDDDDD   │
  424.   EEEEEEEEEEE FFFFFFFFFFFFF    │GGGGGGGGGGGGGGGGGGGGGG       │
  425.   form─────────────────────────┼─────────────────────────────┼─────
  426.   page─────────────────────────┼─────────────────────────────┼─────
  427.   ═════════════════════════════╧═════════════════════════════╧═════
  428.  
  429.   Example 2b:
  430.  
  431.   This is the same report after the Page Width has been increased
  432.   to accommodate a five character margin offset.  As you can see
  433.   fields C, D, and G now belong (partially) to the wrong page
  434.   width.
  435.  
  436.   ....+...10....+...20....+...30....*....+...10....+...20....+...30
  437.    Report Header Info            Report Header Info
  438.   page──────────────────────────────┼──────────────────────────────
  439.   form──────────────────────────────┼──────────────────────────────
  440.   AAAAAAAAAA BBBBBBBBBB         CCCCCCCC DDDDDDDDDDDDDDDDD
  441.   EEEEEEEEEEE FFFFFFFFFFFFF     GGGGGGGGGGGGGGGGGGGGGG
  442.   form──────────────────────────────┼──────────────────────────────
  443.   page──────────────────────────────┼──────────────────────────────
  444.   ══════════════════════════════════╧══════════════════════════════
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.   PRODUCT  :  Paradox                                NUMBER  :  852
  471.   VERSION  :  All
  472.        OS  :  DOS
  473.      DATE  :  February 23, 1993                        PAGE  :  8/8
  474.  
  475.     TITLE  :  Styling Paradox Reports and Mailing Labels
  476.  
  477.  
  478.  
  479.  
  480.   Example 2c:
  481.  
  482.   This is the same report after the fields and text have been moved
  483.   to accommodate the margin offset.  No actual styling setup
  484.   strings have been placed yet.
  485.  
  486.   ....+...10....+...20....+...30....*....+...10....+...20....+...30
  487.    Report Header Info               │ Report Header Info
  488.   page──────────────────────────────┼──────────────────────────────
  489.   form──────────────────────────────┼──────────────────────────────
  490.   AAAAAAAAAA BBBBBBBBBB             │CCCCCCCC DDDDDDDDDDDDDDDDD
  491.   EEEEEEEEEEE FFFFFFFFFFFFF         │GGGGGGGGGGGGGGGGGGGGGG
  492.   form──────────────────────────────┼──────────────────────────────
  493.   page──────────────────────────────┼──────────────────────────────
  494.   ═════════════════════════════════════════════════════════════════
  495.  
  496.   Once in this state it is important to maintain the field
  497.   positions as they appear.  Inputting setup strings in one page
  498.   width will move the fields in the subsequent page widths to the
  499.   right.  Restore them to their proper positions when this occurs.
  500.  
  501.   DISCLAIMER: You have the right to use this technical information
  502.   subject to the terms of the No-Nonsense License Statement that
  503.   you received with the Borland product to which this information
  504.   pertains.
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.